package com.topisv.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.ExpressBillManage;

public interface ExpressBillManageDao extends PagingAndSortingRepository<ExpressBillManage, Long>, JpaSpecificationExecutor<ExpressBillManage>{
	
	@Query("select e from ExpressBillManage e where e.customerId = ?1 and e.expressNo = ?2 and e.orderNo = ?3")
	ExpressBillManage findOld(String customerId, String expressNo,String orderNo);
	
	@Modifying
    @Query("delete from ExpressBillManage e where CONCAT(e.expressNo,e.orderNo) in ?1")
	int deleteByexpress(List<String> existParam);
	
}
